local hx__gyfr = fk.CreateSkill {
  name = "hx__gyfr",
}


hx__gyfr:addEffect("active", {
  name = "hx__gyfr",
  anim_type = "offensive",
  prompt = "#hx__gyfr",
  target_num = 1,
  can_use = function(self, player)
    return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
  end,
  target_filter = function(self, player, to_select, selected, selected_cards)
    return #selected == 0
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local to = effect.tos[1]
    local hp = room:askToChoice(player, {
      choices = {"1", "2"},
      skill_name = hx__gyfr.name,
      prompt = "请选择流失的体力",
      cancelable = false,
    })
    if hp == "1" then
      room:loseHp(to, 1,hx__gyfr.name)
      room:loseHp(player, 1,hx__gyfr.name)
    else
      room:loseHp(to, 2,hx__gyfr.name)
      room:loseHp(player, 2,hx__gyfr.name)
    end
  end,
})


return hx__gyfr